import request from "@/utils/request";
// 查询科目设置列表 /tool/budgetSubject/listWithChecker?service_id=${service_id}
export const listWithCheckerApi = id => {
  return request({
    url: `/tool/budgetSubject/listWithChecker?service_id=${id}`
  });
};
// 获取所有标准预算科目  /tool/budgetSubject/list
export const listApi = () => {
  return request({
    url: "/tool/budgetSubject/list"
  });
};
// 添加多个预算科目 /tool/budgetSubject/addlist
export const addlistApi = data => {
  return request({
    url: "/tool/budgetSubject/addlist",
    method: "post",
    data
  });
};
// 删除预算科目 /tool/budgetSubject/remove/{id}
export const removeBudgetSubjectApi = id => {
  return request({
    url: `/tool/budgetSubject/remove/${id}`,
    method: "DELETE"
  });
};
// 添加单个预算科目 /tool/budgetSubject/addWithChecker
export const addBudgetSubjectApi = data => {
  return request({
    url: "/tool/budgetSubject/addWithChecker",
    method: "post",
    data
  });
};
// 修改预算科目 /tool/budgetSubject/edit
export const editBudgetSubjectApi = data => {
  return request({
    url: "/tool/budgetSubject/edit",
    method: "put",
    data
  });
};
// 发票限制 批量修改选中状态 /tool/budgetSubject/updateByServiceId
export const updateByServiceIdApi = data => {
  return request({
    url: "/tool/budgetSubject/updateByServiceId",
    method: "put",
    data
  });
};

// 代理分账 批量修改选中状态 /tool/budgetSubject/updateAgencySplit
export const updateAgencySplitBudgetSubjectApi = data => {
  return request({
    url: "/tool/budgetSubject/updateAgencySplit",
    method: "put",
    data
  });
};